-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix Fomantic's line-height causing vertical scrollbars to appear #26961
Conversation
For #25597 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line-height is the right approach. 👍 (if it doesn't affect others .....)
But I am not sure whether adding it to text truncate
is good enough .....
After reading the code again, I think the root problem is that the Fomantic List has some pre-defined "line-height" /* List Item */
ul.ui.list li,
ol.ui.list li,
.ui.list > .item,
.ui.list .list > .item {
display: list-item;
table-layout: fixed;
list-style-type: @listStyleType;
list-style-position: @listStylePosition;
padding: @itemPadding;
line-height: @itemLineHeight;
} I believe the line-height fix should be applied to the "li / item" selector. |
I guess we can just override the Fomantic UI variable https://github.com/go-gitea/gitea/blob/main/web_src/fomantic/_site/globals/site.variables Then maybe many patched styles could also be removed. |
Personally, I don't think
So, I think it's easier to maintain it in gitea's own css as needed, but it's also possible that I'm not thinking enough. |
I would prefer to change @silverwind what do you think? |
In fact, I have tried, as I said, because of internal dependencies, resulting in changes will need to do all kinds of compatibility; Here are some of the dependencies I analyzed: /* List Item */
ul.ui.list li,
ol.ui.list li,
.ui.list > .item,
.ui.list .list > .item {
...
line-height: @itemLineHeight;
} @itemLineHeight: @relativeLarge; @contentLineHeight: @itemLineHeight;
@contentLineHeightOffset: ((@contentLineHeight - 1em) / 2); @relativeLarge: unit(@largeRaw, em); This PR focuses on Potentially unhandled rejection [2] Error: Error in plugin "gulp-less"
Message:
Operation on an invalid type in file /kerwin612/.linux/ws/gitea/web_src/fomantic/node_modules/fomantic-ui/src/themes/default/elements/list.variables line no. 48
Details:
type: Operation
filename: /kerwin612/.linux/ws/gitea/web_src/fomantic/node_modules/fomantic-ui/src/themes/default/elements/list.variables
index: 1081
line: 48
column: 15
callLine: NaN
callExtract: undefined
,@contentLineHeight: @itemLineHeight;
lineNumber: 48
fileName: /kerwin612/.linux/ws/gitea/web_src/fomantic/node_modules/fomantic-ui/src/themes/default/elements/list.variables
at DestroyableTransform.errorHandler (/kerwin612/.linux/ws/gitea/web_src/fomantic/node_modules/fomantic-ui/tasks/config/tasks.js:124:19)
at DestroyableTransform.emit (node:events:525:35)
at DestroyableTransform.emit (node:domain:489:12)
at onwriteError (/kerwin612/.linux/ws/gitea/web_src/fomantic/node_modules/readable-stream/lib/_stream_writable.js:449:12)
at onwrite (/kerwin612/.linux/ws/gitea/web_src/fomantic/node_modules/readable-stream/lib/_stream_writable.js:470:11)
at WritableState.onwrite (/kerwin612/.linux/ws/gitea/web_src/fomantic/node_modules/readable-stream/lib/_stream_writable.js:180:5)
at DestroyableTransform.afterTransform (/kerwin612/.linux/ws/gitea/web_src/fomantic/node_modules/readable-stream/lib/_stream_transform.js:93:3)
at /kerwin612/.linux/ws/gitea/web_src/fomantic/node_modules/gulp-less/index.js:58:14
at tryCatchReject (/kerwin612/.linux/ws/gitea/web_src/fomantic/node_modules/when/lib/makePromise.js:845:30)
at runContinuation1 (/kerwin612/.linux/ws/gitea/web_src/fomantic/node_modules/when/lib/makePromise.js:804:4)
Potentially unhandled rejection [4] Error: Error in plugin "gulp-less"
Message:
Operation on an invalid type in file /kerwin612/.linux/ws/gitea/web_src/fomantic/node_modules/fomantic-ui/src/themes/default/elements/list.variables line no. 48
Details:
type: Operation
filename: /kerwin612/.linux/ws/gitea/web_src/fomantic/node_modules/fomantic-ui/src/themes/default/elements/list.variables
index: 1081
line: 48
column: 15
callLine: NaN
callExtract: undefined
,@contentLineHeight: @itemLineHeight;
lineNumber: 48
fileName: /kerwin612/.linux/ws/gitea/web_src/fomantic/node_modules/fomantic-ui/src/themes/default/elements/list.variables
at DestroyableTransform.errorHandler (/kerwin612/.linux/ws/gitea/web_src/fomantic/node_modules/fomantic-ui/tasks/config/tasks.js:124:19)
at DestroyableTransform.emit (node:events:525:35)
at DestroyableTransform.emit (node:domain:489:12)
at onwriteError (/kerwin612/.linux/ws/gitea/web_src/fomantic/node_modules/readable-stream/lib/_stream_writable.js:449:12)
at onwrite (/kerwin612/.linux/ws/gitea/web_src/fomantic/node_modules/readable-stream/lib/_stream_writable.js:470:11)
at WritableState.onwrite (/kerwin612/.linux/ws/gitea/web_src/fomantic/node_modules/readable-stream/lib/_stream_writable.js:180:5)
at DestroyableTransform.afterTransform (/kerwin612/.linux/ws/gitea/web_src/fomantic/node_modules/readable-stream/lib/_stream_transform.js:93:3)
at /kerwin612/.linux/ws/gitea/web_src/fomantic/node_modules/gulp-less/index.js:58:14
at tryCatchReject (/kerwin612/.linux/ws/gitea/web_src/fomantic/node_modules/when/lib/makePromise.js:845:30)
at runContinuation1 (/kerwin612/.linux/ws/gitea/web_src/fomantic/node_modules/when/lib/makePromise.js:804:4)
[09:02:56] The following tasks did not complete: build, build-css, <series>, <series>, Building uncompressed CSS, Building compressed CSS
[09:02:56] Did you forget to signal async completion?
make: *** [Makefile:947: fomantic] Error 1 Because I think this change may be more and more difficult to maintain, so I did not continue, as I replied earlier, I don't quite agree with this modification. |
Thank you for sharing your findings. Although I have read your comment carefully, my initial thought is "we can override the computed variables together". But it looks that it is more complex than it should be. TBH, there is still another problem in this PR: the |
@kerwin612 changes looks good code viz but due to language barriers could you add some context about this Pr in the description or in PR title. Easy for others too look into. Thanks for this change. Appreciate. 🚀 Backport. |
If it works, sure. My experience with Fomantic var overrides is that some work, some don't for unknown reason. I think this one doesn't. |
I was unable to create a backport for 1.20. @kerwin612, please send one manually. 🍵
|
* giteaofficial/main: Display all user types and org types on admin management UI (go-gitea#27050) Apply lng2020 to maintainers (go-gitea#27068) Fix incorrect default branch label while switching between branches (go-gitea#27053) set version in snapcraft yaml Replace 'userxx' with 'orgxx' in all test files when the user type is org (go-gitea#27052) [skip ci] Updated translations via Crowdin Load reviewer before sending notification (go-gitea#27063) bump all nightly builds to 16gb Show the repo count in code tab on both user profile and org page. (go-gitea#27048) Fix Fomantic's line-height causing vertical scrollbars to appear (go-gitea#26961) Dashboard context dropdown position fix on landing page in mobile view. (go-gitea#27047)
Before:
After:
As shown in the screenshot, the red box area should not be clickable